<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
	//获取session数据
	String city = (String)request.getSession().getAttribute("city");//城市名
	String errMsg = (String)request.getSession().getAttribute("errMsg");//错误信息
	if(errMsg==null){
		errMsg="";
	}else{
		errMsg = (String)request.getSession().getAttribute("errMsg");
	}
	if(city==null){
		city="";
	}else{
		city = (String)request.getSession().getAttribute("city");
	}
	
	
	String citycode = "城市代码:"+(String)request.getSession().getAttribute("citycode"); //城市编码	
	String date = "日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期:"+(String)request.getSession().getAttribute("date");
	String time = "发布时间:"+(String)request.getSession().getAttribute("time");
	String altitude = "海&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;拔:"+(String)request.getSession().getAttribute("altitude")+"Km";
	String weather =  "天气情况:"+(String)request.getSession().getAttribute("weather");
	String temp = "现在温度:"+(String)request.getSession().getAttribute("temp")+"℃";
	String l_tmp = "最低温度:"+(String)request.getSession().getAttribute("l_tmp")+"℃";
	String h_tmp = "最高温度:"+(String)request.getSession().getAttribute("h_tmp")+"℃";
	String WD =    "风&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;向:"+(String)request.getSession().getAttribute("WD");
	String WS =    "风&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;力:"+(String)request.getSession().getAttribute("WS");
	String sunrise = "日出时间:"+(String)request.getSession().getAttribute("sunrise");
	String sunset = "日落时间:"+(String)request.getSession().getAttribute("sunset");
	

	String inputTxt = (String)request.getSession().getAttribute("inputTxt");
	if(inputTxt==null){
		inputTxt="";
	}else{
		inputTxt="您输入的信息为:<br><font color=\"black\">"+inputTxt+"</font>";
	}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html  lang="en-US">
  <head>
    <base href="<%=basePath%>">
    
    <title>Arice App</title>
    
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
    <meta charset="utf-8">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" href="css/animate.css">
	<link rel="stylesheet" href="css/font-awesome.min.css">
	<link rel="stylesheet" href="css/templatemo-style.css">

	<!-- jQuery -->
	<script src="js/jquery-1.11.0.min.js"></script>
	<script src="js/jquery-migrate-1.2.1.min.js"></script>

  </head>
  
  <body>
  
  <!-- HEADER -->
	<div class="fluid-container">
		<header class="site-header">
			<div class="navbar-default navbar-fixed-top">
				<div class="fluid-container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
						<i class="fa fa-bars"></i>
					</button>
					<a class="navbar-brand" href="#">arice app</a>
				</div>
				<div class="navbar-collapse collapse">
					<ul class="nav navbar-nav navbar-right">
					<li><a class="link-contact" href="index.jsp" style="background-color: #ccffff">天气查询</a></li>
						<li><a class="link-service" href="joke.jsp">每天一笑</a></li>
						<li><a class="link-facts" href="erwei.jsp">二维码生成器</a></li>
						<li><a class="link-portfolio" href="#portfolio">Portfolio</a></li>
						<li><a class="link-clients" href="#clients">Clients</a></li>
						<li><a class="link-contact" href="#contact">Contact</a></li>
					</ul>
				</div>
				</div>
			</div>
		</header> <!-- .site-header -->
	</div> <!-- .fluid-container -->
	
	<!-- WELCOME TEXT -->
	<div class="main-content">
	<div class="fluid-container" >
		<div class="section-welcome" style="background-color: #ccffff" >
			<div class="row" >
            	<div class="col-md-4 text-center">
					<!--  img src="img/portfolio/5.jpg" class="img-responsive animated fadeInLeft" alt="Time is happiness"-->
					<div class="counter-body" >
								<form method="get" action="/Weather/Search"  >
									<h3>请输入您要查询的城市：</h3>
									<input type="text" name="cityname" value="<%=city%>" style="background-color: #ccffff"> 
									<input type="submit"value="查询">
								</form>
								<font color="red"><%=errMsg %></font>
								
						<div class="end-count"></div>
					</div>
				</div>
				<div class="col-md-8 text-center welcome-section" >
                	<table  >
                		<table align="center" width="650px" height="260px" border="2px" style="border-color: #ccffff;">
                		<tr><td bgcolor="#00ffcc"><%=city %>今日天气情况：</td><td rowspan="12"><img src="img/portfolio/2.jpg" height="265px" width="400px"></td></tr>
                		<tr><td><%=date %></td></tr>
                		<tr><td><%= time%></td></tr>
                		<tr><td><%=weather %></td></tr>
                		<tr><td><%=temp %></td></tr>
                		<tr><td><%= l_tmp%></td></tr>
                		<tr><td><%=h_tmp %></td></tr>
                		<tr><td><%= WD%></td></tr>
                		<tr><td><%= WS%></td></tr>
                		<tr><td><%=sunrise %></td></tr>
                		<tr><td><%= sunset%></td></tr>
                		<tr><td><a href="#">未来七天天气</a></td></tr>
                	</table>
                	</table>
				</div>
				
			</div>
		</div>
	</div>
	
	<!-- FOOTER -->
	<div class="fluid-container">
		<footer class="site-footer">
			<a href="#" class="back-to-top">
				<i class="fa fa-angle-up"></i>
			</a>
			<div class="row">
				<div class="col-md-6 col-sm-6 col-xs-12 padding-left-0" >
					<p class="copyright">Copyright &copy; 2015 Powder By  <a href="http://blog.sina.com.cn/ariceone" target="_blank">Arice</a></p>
				</div><!-- 
				<div class="col-md-6 col-sm-6 col-xs-12 padding-right-0">
					<ul class="social">
						<li><a href="#"><i class="fa fa-facebook"></i> 新浪微博</a></li>
						<li><a href="#"><i class="fa fa-twitter"></i> Twitter</a></li>
						<li><a href="#"><i class="fa fa-youtube"></i> Youtube</a></li>
					</ul>
				</div> -->
			</div>
		</footer>
	</div>
	</div>
	

	<!-- Plugins -->
	<script src="js/bootstrap.js"></script>
	<script src="js/plugins.js"></script>
	<script src="js/custom.js"></script>

	<!-- Google Map -->
  </body>
</html>
